package com.example.dto;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

/**
 * 讲座统计响应DTO
 * 用于返回讲座的统计信息
 */
@Data
@Schema(description = "讲座统计响应数据传输对象")
public class LectureStatisticsResponseDTO {

    @Schema(description = "讲座基本信息")
    private LectureResponseDTO lectureInfo;

    @Schema(description = "总报名人数", example = "15")
    private Long totalRegistrations;

    @Schema(description = "已签到人数", example = "12")
    private Long checkedIn;

    @Schema(description = "未签到人数", example = "3")
    private Long notCheckedIn;

    @Schema(description = "已取消人数", example = "2")
    private Long cancelled;

    @Schema(description = "签到率", example = "80.0%")
    private String checkInRate;

    @Schema(description = "人数限制", example = "20")
    private Integer participantLimit;

    @Schema(description = "可用名额", example = "5")
    private Object availableSlots; // 可能是数字或"无限制"

    @Schema(description = "是否满员", example = "false")
    private Boolean isFull;

    @Schema(description = "报名状态分布")
    private RegistrationStatusDistribution statusDistribution;

    /**
     * 报名状态分布内部类
     */
    @Data
    @Schema(description = "报名状态分布")
    public static class RegistrationStatusDistribution {
        
        @Schema(description = "待签到人数", example = "3")
        private Long pending;

        @Schema(description = "已签到人数", example = "12")
        private Long checkedIn;

        @Schema(description = "已取消人数", example = "2")
        private Long cancelled;
    }
}